<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>{$list['name']}</title>
    <include file="Template/head"/>
    <?php
require_once "./App/Home/Common/jssdk.php";
$jssdk = new JSSDK("wx50158a5e179525ab", "d4065289c8314cbb82bb64d58eda674b");
$signPackage = $jssdk->GetSignPackage();
    ?>
<body>
<div class="actNav">
    <div class="doRefresh">产品详情</div>
    <a href="javascript:history.go(-1);" class="back"></a>
    <a href="{:U('Index/index')}" class="home"></a>
</div>

<div class="wapper detailPage">
    <form method="post" action="{:U('Agency/details',array('id'=>$list['id']))}">
        <input type="hidden" name="id" id="id" value="{$list.id}">
        <input id="doRecommend" type="hidden" value="{:U('Agency/recommend')}"/>

        <div class="module">
            <h1 class="title" style="padding:10px;overflow:visible;height:auto;line-height:25px;">{$list.name}</h1>
            <div class="price clearfix">
                  <span class="w pull-left">
                        价　格：<dfn>&yen;{$list.price_agency|getYuan}</dfn>起
                  </span>
            </div>
        </div>

        <div class="module gallery">
            <ul class="act clearfix">
                <li class="icon i-2">
                    <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin={$qq}&site=qq&menu=yes"><i></i><span
                            class="w">在线沟通</span></a>
                </li>
            </ul>
        </div>

        <div class="module blockItem">
            <div class="t" data-event-trigger><i class="icon i-2"></i>产品特色<span class="arrow"></span></div>
            <div class="pad" style="margin-left: 20px">
                <p>{$list.description}</p>
            </div>
        </div>

        <div class="detail-bottom clearfix">

            <if condition="$Think.session.isLogin eq yes">
                <a href="tel:{$contactPhone}"><i></i>电话咨询</a>
                <else/>
                <a href="tel:{$mobile}"><i></i>电话咨询</a>
            </if>

            <if condition="$Think.session.isLogin eq yes">
                <a href="{:U('Product/orderInfo',array('id'=>$list['id']))}" class="yd">
                    立即预订
                </a>
                <else/>
                <a class="yd"></a>
            </if>
        </div>
        <div class="modal fade popWin bs-example-modal-sm" id="myModalSuc" tabindex="-1" role="dialog"
             aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-sm">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="myModalLabel">提示</h4>
                    </div>
                    <div class="modal-body text-center">
                        <p class="tipsBox"><i class="suc"></i>推荐成功</p>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-warning" data-dismiss="modal" aria-label="Close">确认
                        </button>
                        <button type="button" class="btn btn-default" data-dismiss="modal" aria-label="Close">取消
                        </button>
                    </div>
                </div>
            </div>
        </div>

        <div class="modal fade popWin bs-example-modal-sm" id="myModalAuc" tabindex="-1" role="dialog"
             aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-sm">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="myModalLabel">提示</h4>
                    </div>
                    <div class="modal-body text-center">
                        <p class="tipsBox"><i class="suc"></i>您已推荐该产品</p>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-warning" data-dismiss="modal" aria-label="Close">确认
                        </button>
                        <button type="button" class="btn btn-default" data-dismiss="modal" aria-label="Close">取消
                        </button>
                    </div>
                </div>
            </div>
        </div>
        <footer class="footer">
            <include file="Template/foot"/>
        </footer>
    </form>
</div>

<script type="text/javascript">
    $(function () {
        $("[data-toggle='tooltip']").tooltip();
    });

    wx.config({
        debug: false,
        appId: '<?php echo $signPackage["appId"];?>',
        timestamp: '<?php echo $signPackage["timestamp"]; ?>',
        nonceStr: '<?php echo $signPackage["nonceStr"];?>',
        signature: '<?php echo $signPackage["signature"];?>',
        jsApiList: [
            'onMenuShareTimeline',
            'onMenuShareAppMessage',
            'onMenuShareQQ',
        ]
    });

    wx.ready(function () {
        var shareData = {
            desc: "{$list.name}",
            title: "{$list.name}",
            link: "{$domain}",
            imgUrl: '{$bgImg}',
        };
        wx.onMenuShareTimeline(shareData);
        wx.onMenuShareAppMessage(shareData);
        wx.onMenuShareQQ(shareData);
    });

</script>
</body>
</html>
